/* 
  巡查巡检
*/
import request from '@/utils/request'

// 查询当月有巡查任务的日期
export function apiPatrolInspectDateByMonth(data) {
  return request({
    url: '/irrigation/dailyLineTask/getTaskDateByMonth',
    method: 'post',
    data
  })
}
// 根据日期查询当天的巡查任务明细
export function apiPatrolInspectListByDate(data) {
  return request({
    url: '/irrigation/dailyLineTask/getCheckDataByDate',
    method: 'post',
    data
  })
}

// 根据线路查询H5
export function apiPatrolInspectListByLine(data) {
  return request({
    url: '/irrigation/dailyLineTask/getCheckDataByLineLableH5',
    method: 'post',
    data
  })
}

// 按线路查看日期H5
export function apiPatrolInspectDateByLine(data) {
  return request({
    url: '/irrigation/dailyLineTask/queryByLineLableDetailH5',
    method: 'post',
    data
  })
}

// 根据线路id和时间查询日常巡巡查次数等信息
export function apiPatrolTaskCountByDate(data) {
  return request({
    url: '/irrigation/dailyLineTask/getLineTaskCountItemNew',
    method: 'post',
    data
  })
}

// 巡查路线列表
export function apiPatrolInspectListPage(data) {
  return request({
    url: '/irrigation/Line/page',
    method: 'post',
    data
  })
}

// 巡查任务生成 返回任务id
export function apiPatrolTaskCreated(data) {
  return request({
    url: '/irrigation/dailyLineTask/generate',
    method: 'post',
    data
  })
}

// 巡查任务详情
export function apiPatrolTaskDetail(data) {
  return request({
    url: '/irrigation/dailyLineTask/detail',
    method: 'post',
    data
  })
}

// 根据线路id查询日常巡查点位信息
export function apiPatrolLineCountItem(data) {
  return request({
    url: '/irrigation/dailyLineTask/getLineTaskCountItem',
    method: 'post',
    data
  })
}

// 巡查点位详情
export function apiPatrolTaskItemDetail(data) {
  return request({
    url: '/irrigation/dailyLineTask/itemDetail',
    method: 'post',
    data
  })
}

// 提交巡查点位信息
export function apiPatrolTaskItemSumbit(data) {
  return request({
    url: '/irrigation/dailyLineTask/patrolTaskItem',
    method: 'post',
    data
  })
}

// 暂存巡查点位信息
export function apiPatrolTaskItemSave(data) {
  return request({
    url: '/irrigation/',
    method: 'post',
    data
  })
}

// 验证是否所有巡检点都已完成巡检
export function apiPatrolTaskValid(data) {
  return request({
    url: '/irrigation/dailyLineTask/validTask',
    method: 'post',
    data
  })
}

// 提交所有巡检点都已完成巡检
export function apiPatrolTaskItemFinish(data) {
  return request({
    url: '/irrigation/dailyLineTask/finishTask',
    method: 'post',
    data
  })
}


// 定期巡查任务 列表
export function apiPatrolRegularTaskList(data) {
  return request({
    url: '/irrigation/regularLineTask/pageH5',
    method: 'post',
    data
  })
}

// 定期巡查任务 无线路提交
export function apiPatrolRegularTaskNoLineSumbit(data) {
  return request({
    url: '/irrigation/regularLineTask/submitTaskH5',
    method: 'post',
    data
  })
}

// 定期巡查任务 任务线路提交
export function apiPatrolRegularTaskSumbit(data) {
  return request({
    url: '/irrigation/regularLineTask/generate',
    method: 'post',
    data
  })
}


// 日常巡查巡检 列表
export function apiPatrolDailyTaskList(data) {
  return request({
    url: '/irrigation/dailyLineTask/pageH5',
    method: 'post',
    data
  })
}
// 日常巡查巡检 我的巡检
export function apiPatrolDailyTaskListMyCreate(data) {
  return request({
    url: '/irrigation/dailyLineTask/myCreate',
    method: 'post',
    data
  })
}

// 根据路线id 查看路线详情
export function apiPatrolLineDetail(data) {
  return request({
    url: '/irrigation/Line/detail',
    method: 'post',
    data
  })
}

// 删除巡检
export function apiPatrolTaskDel(data) {
  return request({
    url: '/irrigation/dailyLineTask/delTask',
    method: 'post',
    data
  })
}